package com.moon.interview.exception;

public class ApplicationException extends RuntimeException{

    private int code;

    public ApplicationException(String message, int code) {
        super(message);
        this.code = code;
    }


    public ApplicationException(SysErrorCode errorCode) {
        super(errorCode.getMessage());
        this.code = errorCode.getCode();
    }

    public ApplicationException(SysErrorCode errorCode, String message) {
        super(message);
        this.code = errorCode.getCode();
    }

    public int getCode() {
        return code;
    }
}
